package com.zone.demo.domain.Mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zone.demo.domain.entity.Myuser;
import org.mapstruct.Mapper;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author MMinbo
 * @since 2019-10-25
 */
@Mapper
public interface MyuserMapper extends BaseMapper<Myuser> {
	// 方法名自动对应
	public Myuser getUserByName(String name);
	//@Select("INSERT INTO MYUSER( ID,NAME,AGE,EMAIL) VALUES(#{id},#{name},#{age},#{email})")
	public void addUser(Long id,String name, int age ,String email);
	public Myuser getUserById(Long id);
	//@Select("SELECT FROM MYUSER WHERE NAME = #{name}")
	public void deleteUserByName(String name);
//	@Select("UPDATE MYUSER SET NAME= #{name},AGE = #{age},EMAIL = #{email} WHERE ID = #{id})")
	public void updateUserById(Long id ,String name, int age ,String email);

	/**
	 * 循环加法
	 * @param initial
	 * @param loop
	 * @return
	 */
	public int add(int initial,int loop);



}
